﻿@model CMSMVC4.Areas.Admin.Models.CategoryNews
@using CMSMVC4.MultiResource
@{
    Layout = null;
}

<div class="box paint color_4">
    @using (Ajax.BeginForm("NewCategory", "News", new AjaxOptions() { HttpMethod = "POST", UpdateTargetId = "dialog", OnSuccess = "show()" }))
    {
        <div id="myModal" class="modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-header">
                <button type="button" class="close1" data-dismiss="modal" aria-hidden="true">×</button>
                <h3 id="myModalLabel">@Admin.CategoryNews</h3>
            </div>
            <div class="modal-body">
                <div class="content">
                    <div class="form-row control-group row-fluid">
                        <label class="control-label span3">@Admin.English (*)<span class="help-block">@Admin.NotNull</span> </label>
                        <div class="controls span7">
                            <input type="text" value="" class="span12" name="NameEn"/>
                            @Html.ValidationMessageFor(x => x.NameEn)
                        </div>
                    </div>
                    <div class="form-row control-group row-fluid">
                        <label class="control-label span3">@Admin.Vietnamese (*)<span class="help-block">@Admin.NotNull</span> </label>
                        <div class="controls span7">
                            <input type="text" value="" class="span12" name="NameVi"/>
                            @Html.ValidationMessageFor(x => x.NameVi)
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <input type="button" class="btn" data-dismiss="modal" value="Close" onclick="hide()" />
                <input type="submit" class="btn btn-primary" value="Save changes" />
            </div>
        </div>
    }
</div>
<script>
    $('.close1').click(function (e) {
        //hủy bỏ các link liên kết,"bỏ dấu #"
        //$("#myModal").addClass("hidden");
        e.preventDefault();
        //đóng thẻ dialog
        $("#dialog").fadeOut(500);
        //đóng thẻ nền dialog
        $("#dialog_nen").fadeOut(500);
    });

    $('.btn1').click(function (e) {
        //hủy bỏ các link liên kết,"bỏ dấu #"
        //$("#myModal").addClass("hidden");
        e.preventDefault();
        //đóng thẻ dialog
        $("#dialog").fadeOut(500);
        //đóng thẻ nền dialog
        $("#dialog_nen").fadeOut(500);
    });

</script>
